package ru.study.thinkin.chapter3;

import java.util.Random;

class Tank {
  int level;
  private int id;
  String version;
  char c;
  Tank () {
	 id= new Random().nextInt(100);	 
  }
  
  public boolean equals(Object obj) {
	  boolean answer = false;
	  if (obj instanceof Tank) {
		  answer=(id==((Tank)obj).getId() ); 
	  }
	  return answer;
  }

public int getId() {
	return id;
}

public void setId(int id) {
	this.id = id;
}
  
  
}